package com.zpark.test;

import com.zpark.log.Log;
import org.apache.log4j.Logger;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.ComponentScan;

/**
 * @PackageName: com.zpark.test
 * @ClassName: ManApp
 * @Description:
 * @author: RZS
 * @date: 2023/3/30  17:38
 */
@ComponentScan("com.zpark")
public class ManApp {
    static Logger log = Logger.getLogger(ManApp.class);

    public static void main(String[] args) {
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(ManApp.class);

        log.info("获取bean对象，执行业务开始....");
        Log world = context.getBean("log", Log.class);
        System.out.println(world.getMessage());
        log.info("获取bean对象，执行业务结束....end...");
    }
}
